package com.ioudi.digu.vo;

import java.util.Date;

import com.ioudi.digu.vo.message.MessageBody;
import com.ioudi.digu.vo.message.MessageHeader;

public class ProducedMessage 
{
	private String messageId;

	private User user;

	private String receiver;
    
	private String channelType = "status";
    
    private String contentType;   
    
    private MessageHeader headers;

	private MessageBody body;
    
    private Date timestamp;

	private String replyID;
	
	private String replyUser;
	
	private String source;
    
    private long favoritedCount;
    
    private String msgTopic;
     

	private Location location;
	
	public String getReplyUser()
	{
		return replyUser;
	}

	public void setReplyUser(String replyUser)
	{
		this.replyUser = replyUser;
	}
	
    public String getReceiver()
	{
		return receiver;
	}

	public void setReceiver(String receiver)
	{
		this.receiver = receiver;
	}

	public String getSource()
	{
		return source;
	}

	public void setSource(String source)
	{
		this.source = source;
	}

    
	public ProducedMessage()
    {	
    	this.timestamp = new Date();
    }
    
	public String getMessageId()
	{
		return messageId;
	}

	public void setMessageId(String messageId)
	{
		this.messageId = messageId;
	}
 
    public User getUser()
	{
		return user;
	}

	public void setUser(User user)
	{
		this.user = user;
	}

	public String getChannelType()
	{
		return channelType;
	}

	public void setChannelType(String channelType)
	{
		this.channelType = channelType;
	}

	public String getContentType()
	{
		return contentType;
	}

	public void setContentType(String contentType)
	{
		this.contentType = contentType;
	}
	
	public MessageHeader getHeaders()
	{
		return headers;
	}

	public void setHeaders(MessageHeader headers)
	{
		this.headers = headers;
	}

	public MessageBody getBody()
	{
		return body;
	}

	public void setBody(MessageBody body)
	{
		this.body = body;
	}
	
	public String getReplyID()
	{
		return replyID;
	}

	public void setReplyID(String replyID)
	{
		this.replyID = replyID;
	}

	public long getFavoritedCount()
	{
		return favoritedCount;
	}

	public void setFavoritedCount(long favoritedCount)
	{
		this.favoritedCount = favoritedCount;
	}

	public Date getTimestamp()
	{
		return timestamp;
	}

	public void setTimestamp(Date timestamp)
	{
		this.timestamp = timestamp;
	}
	
	public Location getLocation()
	{
		return location;
	}

	public void setLocation(Location location)
	{
		this.location = location;
	}
	
	public String getMsgTopic()
	{
		return msgTopic;
	}

	public void setMsgTopic(String msgTopic)
	{
		this.msgTopic = msgTopic;
	}
	
	public boolean equals(Object obj) 
	{
		if(obj instanceof ProducedMessage)
		{
			return this.messageId.equals(((ProducedMessage)obj).messageId);
		}
		return false;
    }
	 
	public int hashCode()
	{
		return this.messageId.hashCode();
	}
}
